package com.bv.hr.common.core.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author CYT7
 * @version 1.0
 * @time 12月 20,2021
 * @describe 自定义异常
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class HrException extends RuntimeException{
    private String msg;
    private int code;

    public HrException(String msg){
        super(msg);
        this.msg = msg;
    }
    public HrException(String msg,Throwable e){
        super(msg,e);
        this.msg = msg;
    }
    public HrException(String msg,int code){
        super(msg);
        this.msg = msg;
        this.code = code;
    }
    public HrException(String msg,int code,Throwable e){
        super(msg,e);
        this.msg = msg;
        this.code = code;
    }
}
